package cn.lngaosu.lwyd.module.integration.dal.mysql.weibouserscounts;

import java.util.*;

import cn.lngaosu.lwyd.framework.common.pojo.PageResult;
import cn.lngaosu.lwyd.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lngaosu.lwyd.framework.mybatis.core.mapper.BaseMapperX;
import cn.lngaosu.lwyd.module.integration.dal.dataobject.weibouserscounts.WeiboUserscountsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.lngaosu.lwyd.module.integration.controller.admin.weibouserscounts.vo.*;

/**
 * 微博用户基本信息 Mapper
 *
 * @author 张恒
 */
@Mapper
public interface WeiboUserscountsMapper extends BaseMapperX<WeiboUserscountsDO> {

    default PageResult<WeiboUserscountsDO> selectPage(WeiboUserscountsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WeiboUserscountsDO>()
                .betweenIfPresent(WeiboUserscountsDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(WeiboUserscountsDO::getWeiboUid, reqVO.getWeiboUid())
                .eqIfPresent(WeiboUserscountsDO::getFollowersCount, reqVO.getFollowersCount())
                .eqIfPresent(WeiboUserscountsDO::getFriendsCount, reqVO.getFriendsCount())
                .eqIfPresent(WeiboUserscountsDO::getStatusesCount, reqVO.getStatusesCount())
                .eqIfPresent(WeiboUserscountsDO::getPrivateFriendsCount, reqVO.getPrivateFriendsCount())
                .eqIfPresent(WeiboUserscountsDO::getPagefriendsCount, reqVO.getPagefriendsCount())
                .betweenIfPresent(WeiboUserscountsDO::getSyncDate, reqVO.getSyncDate())
                .orderByDesc(WeiboUserscountsDO::getId));
    }

}